﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace HYRElectric.WirePlace
{
	internal class PointComparer : IComparer<XYZ>
	{
		public PointComparer(XYZ refPoint)
		{
			this.m_ReferencePoint = new XYZ(refPoint.X, refPoint.Y, 0.0);
		}

		public int Compare(XYZ temp1, XYZ temp2)
		{
			return temp1.DistanceTo(this.m_ReferencePoint).CompareTo(temp2.DistanceTo(this.m_ReferencePoint));
		}

		private XYZ m_ReferencePoint;
	}
}
